home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 139
/
(Vol 139) Sep 24 2011.iso
/
Games
/
kirby.swf
/
scripts
/
frame_12
/
PlaceObject2_263_206
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2011-09-24
|
31KB
|
1,045 lines
onClipEvent(enterFrame){
if(_root.setvarsoff == "on")
{
JumpDown = "off";
normMainSpeed = 7;
Jumpspeed = 15;
Jumptime = 5;
YSpeed = 0;
isjumping = "off";
isAttacking = "off";
normGravity = 3;
normMaxYSpeed = 10;
YSpeed = 0;
YSpeed = 0;
isjumping = "off";
isAttacking = "off";
Fly = "off";
Fat = "off";
spit = "off";
Spiting = "off";
CSPattack = "off";
attackdemo = "off";
hit = "off";
_root.setvarsoff = "off";
UpDownDoor = "on";
}
if(_root.Movheight < this._y + _root.Level._y)
{
Die = "on";
}
if(Die == "on")
{
if(_root.Movheight + 100 < this._y)
{
if(_root.Levelchange._currentframe < 50)
{
_root.Levelchange.gotoAndPlay(50);
}
}
DY -= 0.5;
this._y -= DY;
hit = "on";
_root.DieS.gotoAndStop(2);
}
else
{
_root.DieS._x = this._x;
_root.DieS._y = this._y;
}
if(Fly == "on")
{
Gravity = normGravity / 10;
MaxYspeed = normMaxYSpeed / 2;
MainSpeed = normMainSpeed / 3;
}
else if(hit == "on2")
{
Gravity = normGravity / 5;
MaxYspeed = normMaxYSpeed;
MainSpeed = normMainSpeed;
}
else if(CSPattack == "stone")
{
Gravity = normGravity * 2;
MaxYspeed = normMaxYSpeed * 2;
MainSpeed = normMainSpeed;
}
else
{
Gravity = normGravity;
MaxYspeed = normMaxYSpeed;
MainSpeed = normMainSpeed;
}
if(hit == "off")
{
if(Key.isDown(left) && isAttacking == "off")
{
this._xscale = -100;
if(X < - normMainspeed / 2 && Dirdown2 == "off" && Ground == "on")
{
run = "on";
}
Dirdown2 = "on";
if(run == "on")
{
Speed = (- MainSpeed) * 1.5;
}
else
{
Speed = - MainSpeed;
}
}
else if(Key.isDown(right) && isAttacking == "off")
{
this._xscale = 100;
if(0 + normMainspeed / 2 < X && Dirdown2 == "off" && Ground == "on")
{
run = "on";
}
Dirdown2 = "on";
if(run == "on")
{
Speed = MainSpeed * 1.5;
}
else
{
Speed = MainSpeed;
}
}
else
{
if(Dirdown2 == "on")
{
DirDownZ = 5;
Dirdown2 = "off";
}
if(DirdownZ >= 0)
{
DirdownZ -= 1;
}
else
{
Dirdown2 = "on2";
}
run = "off";
Dirdown = "off";
Speed = 0;
}
}
if(Key.isDown(attack) && Spiting == "off")
{
if(Attackdemo == "off" && hit == "off")
{
if(SPAttack != "off" && CSPattack == "off" && Fly == "off")
{
if(SPattack == "Sword")
{
if(AttackDown2 == "off")
{
if(Ground == "on")
{
CSPAttack = "Sword";
}
else
{
CSPAttack = "SwordJump";
}
}
}
else if(SPattack == "Crash")
{
if(AttackDown2 == "off")
{
CSPAttack = SPattack;
}
}
else
{
CSPAttack = SPattack;
}
}
else if(AttackDown == "off")
{
if(Fly == "on" && AttackDown2 == "off" && CSPattack == "off")
{
if(YSpeed < 0)
{
YSpeed = 0;
}
Fly = "on2";
}
else if(Fat == "on")
{
spit = "on";
}
else if(SPattack != "off")
{
if(CSPattack != "SwordJump")
{
isAttacking = "on";
}
}
else
{
isAttacking = "on";
Z = 0;
var forvar = 1;
while(20 >= forvar)
{
if(this.Kirby.inhale.hitTest(_root.Level.SPAStar) && _root.Level.SPAStar._currentframe == 1)
{
_root.Level.SPAStar.Y = 0;
_root.Level.SPAStar.X = 0;
Spiting = "SPAStar";
AttackDown = "on";
forvar = 50;
}
if(Z == 0)
{
if(this.Kirby.inhalenear.hitTest(_root.Level["Enemy" add forvar]) && _root.Level["Enemy" add forvar]._visible == 1)
{
Spiting = "Enemy" add forvar;
AttackDown = "on";
forvar = 50;
}
else if(this.Kirby.inhalenear.hitTest(_root.Level["B" add forvar]) && _root.Level["B" add forvar]._visible == 1)
{
Spiting = "B" add forvar;
AttackDown = "on";
forvar = 50;
}
}
else if(this.Kirby.inhale.hitTest(_root.Level["Enemy" add forvar]) && _root.Level["Enemy" add forvar]._visible == 1)
{
Spiting = "Enemy" add forvar;
AttackDown = "on";
forvar = 50;
}
else if(this.Kirby.inhale.hitTest(_root.Level["B" add forvar]) && _root.Level["B" add forvar]._visible == 1)
{
Spiting = "B" add forvar;
AttackDown = "on";
forvar = 50;
}
if(forvar == 20 && Z == 0)
{
Z = 1;
forvar = 0;
}
forvar++;
}
}
}
}
AttackDown2 = "on";
}
else
{
AttackDown2 = "off";
if(!(CSPAttack == "off" || CSPattack == "Crash"))
{
if(CSPattack != "off")
{
if(Ground == "on")
{
CSPAttack = "on2";
}
}
else
{
CSPAttack = "on2";
}
}
if(Spiting == "off")
{
AttackDown = "off";
if(isAttacking == "on")
{
isAttacking = "on2";
}
}
else if(_root.Level[spiting].hitTest(this.feet))
{
isAttacking = "off";
AttackDown = "on";
fat = "on";
if(3 < _root.Level[spiting].SPattack.length)
{
MSPattack = _root.Level[spiting].SPattack;
}
else
{
MSPattack = "off";
}
_root.Level[spiting].Enemy.On = "off2";
_root.Level[spiting]._visible = 0;
Spiting = "off";
}
else
{
isAttacking = "on";
_root.Level[spiting]._y -= (_root.Level[spiting]._y + _root.Level._y - this._y) / 5;
_root.Level[spiting]._x -= (_root.Level[spiting]._x + _root.Level._x - this._x) / 5;
}
}
if(Key.isDown(up) && Fly != "on2" && Fat != "on" && Attackdemo == "off" && Spiting == "off" && isAttacking == "off" && CSPattack != "SwordJump" || Key.isDown(Jump) && Fly != "on2" && Fat != "on" && Attackdemo == "off" && Spiting == "off" && isAttacking == "off" && CSPattack != "SwordJump" && JumpDown == "off" && Ground == "off")
{
if(UpDownDoor != "on")
{
if(CSPattack == "off")
{
if(Fly == "on")
{
this.Kirby.play();
}
isjumping = "on";
Fly = "on";
YSpeed = FlySpeed;
UpDown = "on";
}
else if(SPattack != "Sword")
{
CSPattack = "on2";
}
}
}
else
{
UpDownDoor = "off";
}
if(Attackdemo == "off")
{
if(Key.isDown(Jump))
{
if(isAttacking == "off")
{
if(Ground == "on" && JumpDown == "off")
{
isjumping = "on";
YSpeed = Jumpspeed;
}
if(0 < YSpeed && isJumping == "on")
{
YSpeed += Gravity / 2;
}
JumpDown = "on";
}
}
else
{
if(0 < JumpTimeZ && JumpTimeZ != Jumptime)
{
}
JumpTimeZ = Jumptime;
JumpDown = "off";
}
}
if(Attackdemo == "off")
{
if(Key.isDown(SPout) && fat == "off" && Fly == "off" && CSPattack == "off" && SPattack != "off" || SPhitout == "on")
{
_root.Level.SPAStar._x = this._x - _root.Level._x;
_root.Level.SPAStar._y = this._y - _root.Level._y - 50;
_root.Level.SPAStar.Y = 10;
_root.Level.SPAStar._visible = 1;
_root.Level.SPAStar.gotoAndStop(1);
_root.Level.SPAStar.VisZ = this.SPAStarVisZ;
if(0 < this._xscale)
{
_root.Level.SPAStar.X = -10;
}
else
{
_root.Level.SPAStar.X = 10;
}
_root.Level.SPAStar.SPattack = SPattack;
SPattack = "off";
SPhitout = "off";
}
}
if(Attackdemo == "off")
{
if(Key.isDown(down))
{
if(spiting == "off" && isattacking == "off" && Speed == 0 && Ground == "on" && CSPattack == "off")
{
YForm = 50;
if(fat == "on")
{
if(MSPattack != "off")
{
SPattack = MSPattack;
Attackdemo = SPattack;
CSPattack = "off";
MSPattack = "off";
}
fat = "off";
}
}
}
}
if(hit != "on4")
{
if(Speed < X)
{
X -= MinusX;
}
else if(X < Speed)
{
X += MinusX;
}
}
if(Attackdemo == "off" && Die != "on")
{
this._x += X;
}
if(MaxYSpeed < YSpeed)
{
this._y -= MaxYSpeed;
}
else if(YSpeed < - MaxYSpeed)
{
this._y += MaxYSpeed;
}
else
{
this._y -= YSpeed;
}
if(Ground == "off")
{
YSpeed -= Gravity;
}
Ground = "off";
var forvar = 1;
while(forvar < 20)
{
if(this.hit2.hitTest(_root.Level["Enemy" add forvar]))
{
if(CSPattack == "elektro" || CSPattack == "stone" || CSPattack == "Spikes")
{
if(this.Kirby._currentframe >= 9)
{
_root.Level["Enemy" add forvar]._visible = 0;
}
}
else
{
_root.Level["Enemy" add forvar]._visible = 0;
}
}
if(_root.Level["Enemy" add forvar]._visible == 1 && "Enemy" add forvar != spiting)
{
if(_root.Starshoot.hitTest(_root.Level["Enemy" add forvar]) || _root.Puhh.hitTest(_root.Level["Enemy" add forvar]))
{
_root.Level["Enemy" add forvar]._visible = 0;
_root.Starshoot.Star.gotoAndStop(3);
_root.Puhh.gotoAndStop(20);
}
if(this.feet.hitTest(_root.Level["Enemy" add forvar]))
{
if(hit == "off")
{
if(CSPattack == "Crash")
{
_root.Level["Enemy" add forvar]._visible = 0;
}
else if(CSPattack != "stone")
{
_root.Level["Enemy" add forvar]._visible = 0;
hit = "on";
}
}
}
}
if(_root.Level["B" add forvar]._visible == 1 && "B" add forvar != spiting)
{
if(_root.Starshoot.hitTest(_root.Level["B" add forvar]) || _root.Puhh.hitTest(_root.Level["B" add forvar]))
{
Blockpuff(forvar);
_root.Level["B" add forvar]._visible = 0;
_root.Starshoot.Star.gotoAndStop(3);
_root.Puhh.gotoAndStop(20);
}
if(_root.Level.SPAStar.hitTest(_root.Level["B" add forvar]))
{
if(_root.Level["B" add forvar]._y - _root.Level["B" add forvar]._height / 2 >= _root.Level.SPAStar.LY - 10 && _root.Level.SPAStar.LX >= _root.Level["B" add forvar]._x - _root.Level["B" add forvar]._width && _root.Level.SPAStar.LX < _root.Level["B" add forvar]._x + _root.Level["B" add forvar]._width)
{
if(0 >= _root.Level.SPAStar.Y)
{
_root.Level.SPAStar._y = _root.Level["B" add forvar]._y - _root.Level["B" add forvar]._height / 2 - _root.Level.SPAStar._height / 2;
_root.Level.SPAStar.Y *= - SPAStarBreak;
}
}
else if(_root.Level.SPAStar.LY >= _root.Level["B" add forvar]._y + _root.Level["B" add forvar]._height / 2 && _root.Level["B" add forvar]._x - _root.Level["B" add forvar]._width < _root.Level.SPAStar.LX && _root.Level.SPAStar.LX < _root.Level["B" add forvar]._x + _root.Level["B" add forvar]._width)
{
_root.Level.SPAStar._y = _root.Level["B" add forvar]._y + _root.Level["B" add forvar]._height / 2 + _root.Level.SPAStar._width / 2 + 5;
_root.Level.SPAStar.Y *= - SPAStarBreak;
}
else if(_root.Level["B" add forvar]._y - _root.Level["B" add forvar]._height / 2 < _root.Level.SPAStar.LY && _root.Level.SPAStar.LY < _root.Level["B" add forvar]._y + _root.Level["B" add forvar]._height / 2)
{
if(_root.Level.SPAStar.LX < _root.Level["B" add forvar]._x)
{
_root.Level.SPAStar._x = _root.Level["B" add forvar]._x - _root.Level["B" add forvar]._width / 2 - this.feet._width / 2;
_root.Level.SPAStar.X *= - SPAStarBreak;
}
else
{
_root.Level.SPAStar._x = _root.Level["B" add forvar]._x + _root.Level["B" add forvar]._width / 2 + this.feet._width / 2;
_root.Level.SPAStar.X *= - SPAStarBreak;
}
}
}
if(this.hit2.hitTest(_root.Level["B" add forvar]))
{
Blockpuff(forvar);
if(CSPattack == "elektro" || CSPattack == "Spikes")
{
if(this.Kirby._currentframe >= 9)
{
_root.Level["B" add forvar]._visible = 0;
}
}
else if(CSPattack != "stone")
{
_root.Level["B" add forvar]._visible = 0;
}
}
else if(this.feet.hitTest(_root.Level["B" add forvar]))
{
if(CSPattack == "stone")
{
Blockpuff(forvar);
_root.Level["B" add forvar]._visible = 0;
YSpeed = 0;
}
else if(_root.Level["B" add forvar]._y + _root.Level._y - _root.Level["B" add forvar]._height / 2 >= LastYpos - 10 && LastXPos >= _root.Level["B" add forvar]._x + _root.Level._x - _root.Level["B" add forvar]._width && LastXPos < _root.Level["B" add forvar]._x + _root.Level._x + _root.Level["B" add forvar]._width)
{
if(0 >= YSpeed)
{
if(hit == "on4")
{
hit = "off";
}
this._y = _root.Level["B" add forvar]._y + _root.Level._y - _root.Level["B" add forvar]._height / 2;
if(Fly != "on")
{
if(YSpeed != 0)
{
YForm = 60;
}
isjumping = "off";
Ground = "on";
}
YSpeed = 0;
}
}
else if(LastYpos >= _root.Level["B" add forvar]._y + _root.Level._y + _root.Level["B" add forvar]._height / 2 && _root.Level["B" add forvar]._x + _root.Level._x - _root.Level["B" add forvar]._width < LastXPos && LastXPos < _root.Level["B" add forvar]._x + _root.Level._x + _root.Level["B" add forvar]._width)
{
this._y = _root.Level["B" add forvar]._y + _root.Level._y + _root.Level["B" add forvar]._height / 2 + this.feet._height;
if(Fly != "on")
{
if(0 < YSpeed)
{
YSpeed = 0;
}
}
}
else if(_root.Level["B" add forvar]._y + _root.Level._y - _root.Level["B" add forvar]._height / 2 < LastYpos && LastYpos < _root.Level["B" add forvar]._y + _root.Level._y + _root.Level["B" add forvar]._height / 2)
{
if(LastXPos < _root.Level["B" add forvar]._x + _root.Level._x)
{
if(CSPattack == "Crash")
{
Blockpuff(forvar);
_root.Level["B" add forvar]._visible = 0;
}
else
{
this._x = _root.Level["B" add forvar]._x + _root.Level._x - _root.Level["B" add forvar]._width / 2 - this.feet._width / 2;
}
}
else if(CSPattack == "Crash")
{
Blockpuff(forvar);
_root.Level["B" add forvar]._visible = 0;
}
else
{
this._x = _root.Level["B" add forvar]._x + _root.Level._x + _root.Level["B" add forvar]._width / 2 + this.feet._width / 2;
}
}
}
}
forvar++;
}
var forvar = 1;
while(forvar < 10)
{
if(_root.Starshoot.hitTest(_root.Level["G" add forvar]))
{
_root.Starshoot.Star.gotoAndStop(3);
}
if(_root.Level.SPAStar.hitTest(_root.Level["G" add forvar]))
{
if(_root.Level.SPAStar.LY >= _root.Level["G" add forvar]._y - 10 && _root.Level["G" add forvar]._y + 10 >= _root.Level.SPAStar.LY)
{
if(0 >= _root.Level.SPAStar.Y)
{
_root.Level.SPAStar._y = _root.Level["G" add forvar]._y - _root.Level.SPAStar._height / 2;
_root.Level.SPAStar.Y *= - SPAStarBreak;
}
}
else if(_root.Level.SPAStar.LY >= _root.Level["G" add forvar]._y)
{
if(_root.Level.SPAStar.LX < _root.Level["G" add forvar]._x + _root.Level["G" add forvar]._width / 2)
{
_root.Level.SPAStar._x = _root.Level["G" add forvar]._x - _root.Level.SPAStar._width / 2;
_root.Level.SPAStar.X *= - SPAStarBreak;
}
else
{
_root.Level.SPAStar._x = _root.Level["G" add forvar]._x + _root.Level["G" add forvar]._width + _root.Level.SPAStar._width / 2;
_root.Level.SPAStar.X *= - SPAStarBreak;
}
}
}
if(this.feet.hitTest(_root.Level["G" add forvar]))
{
if(this._y >= _root.Level["G" add forvar]._y + _root.Level._y - MaxYSpeed && _root.Level["G" add forvar]._y + _root.Level._y + MaxYSpeed >= this._y)
{
if(0 >= YSpeed)
{
if(hit == "on4")
{
Speed = 0;
X = 0;
hit = "off";
}
this._y = _root.Level["G" add forvar]._y + _root.Level._y;
if(Fly != "on")
{
if(YSpeed != 0)
{
YForm = 60;
}
isjumping = "off";
Ground = "on";
}
YSpeed = 0;
}
}
else if(this._y >= _root.Level["G" add forvar]._y + _root.Level._y + MaxYSpeed)
{
if(this._x < _root.Level["G" add forvar]._x + _root.Level._x + _root.Level["G" add forvar]._width / 2)
{
if(CSPattack == "Crash")
{
X = 0;
hit = "on3";
CSPattack = "off";
this._x = _root.Level["G" add forvar]._x + _root.Level._x - this.feet._width;
}
else
{
if(Speed != 0)
{
Speed = 0;
}
this._x = _root.Level["G" add forvar]._x + _root.Level._x - this.feet._width / 2;
}
}
else if(CSPattack == "Crash")
{
X = 0;
hit = "on3";
CSPattack = "off";
this._x = _root.Level["G" add forvar]._x + _root.Level._x + _root.Level["G" add forvar]._width + this.feet._width;
}
else
{
this._x = _root.Level["G" add forvar]._x + _root.Level._x + _root.Level["G" add forvar]._width + this.feet._width / 2;
}
}
}
forvar++;
}
if(_root.Level.Bogen.hitTest(_X + x,_Y + y,true))
{
isjumping = "off";
Ground = "on";
Fly = "off";
YSpeed = -10;
var forvar = 0;
while(100 >= forvar)
{
this._y -= 1;
if(!_root.Level.Bogen.hitTest(_X + x,_Y + y,true))
{
this._y += 1;
forvar = 100;
}
forvar++;
}
}
if(_root.Door != 0)
{
this.gotoAndStop("door1");
_root.setvarsoff = "on";
this._x = _root.CdoorX;
this._y = _root.CdoorY;
}
else if(hit == "on3")
{
isAttacking = "off";
YSpeed = 15;
hit = "on4";
CSPattack = "off";
Fly = "off";
if(0 < this._xscale)
{
X = -10;
}
else
{
X = 10;
}
this.gotoAndStop("hit");
}
else if(hit == "on")
{
isAttacking = "off";
YSpeed = 0;
if(0 < this._xscale)
{
X = -8;
}
else
{
X = 8;
}
if(SPattack != "off")
{
SPhitout = "on";
}
CSPattack = "off";
Fly = "off";
this.gotoAndStop("hit");
hit = "on2";
}
else if(hit == "on2")
{
this._x += X;
isAttacking = "off";
Fly = "off";
CSPattack = "off";
if(X == 0)
{
Speed = 0;
hit = "off";
}
this.gotoAndStop("hit");
}
else if(hit == "on4")
{
if(0 < this._xscale)
{
X = -4;
}
else
{
X = 4;
}
isAttacking = "off";
Fly = "off";
CSPattack = "off";
if(Ground == "On")
{
Speed = 0;
hit = "off";
}
this.gotoAndStop("hit");
}
else if(attackDemo != "off")
{
this.gotoAndStop("attackDemo");
if(1 >= this.Kirby._currentframe)
{
if(this._yscale >= 90 && YForm >= 100)
{
this.Kirby.gotoAndPlay(attackdemo);
}
else
{
this.Kirby.gotoAndStop("1");
}
}
if(this.Kirby._currentframe == 2 && this._currentframe == 75)
{
attackDemo = "off";
}
YSpeed = 0;
Speed = 0;
}
else if(CSPattack == "stone" || CSPattack == "elektro" || CSPattack == "Spikes")
{
this.gotoAndStop("attack" add CSPattack);
if(this.Kirby._currentframe < 9)
{
if(CSPattack != "Beam")
{
YSpeed = 0;
}
Speed = 0;
}
}
else if(CSPattack == "fire")
{
if(!Key.isDown(attack))
{
isAttacking = "off";
if(this.Kirby._currentframe < 40)
{
this.Kirby.gotoAndPlay("off");
}
}
this.gotoAndStop("attack" add CSPattack);
if(this.Kirby._currentframe < 9)
{
if(Ground == "on")
{
Speed = 0;
}
}
}
else if(CSPattack == "SwordJump" || CSPattack == "Beam" || CSPattack == "Boomerang")
{
this.gotoAndStop("attack" add CSPattack);
if(this.Kirby._currentframe >= this.Kirby._totalframes)
{
isAttacking = "off";
CSPattack = "off";
}
}
else if(CSPattack == "Crash" || CSPattack == "on2" && SPattack == "Crash")
{
this.gotoAndStop("attack" add CSPattack);
YSpeed = 0;
if(0 < this._xscale)
{
X = 15;
}
else
{
X = -15;
}
if(this.Kirby._currentframe >= this.Kirby._totalframes)
{
isAttacking = "off";
CSPattack = "off";
}
}
else if(CSPattack == "Sword")
{
this.gotoAndStop("attack" add CSPattack);
Speed = 0;
if(this.Kirby._currentframe >= this.Kirby._totalframes)
{
isAttacking = "off";
CSPattack = "off";
}
}
else if(CSPattack == "on2")
{
if(this._currentframe < 75)
{
CSPattack = "off";
}
if(SPattack == "Sword")
{
if(this.Kirby._currentframe >= this.Kirby._totalframes)
{
isAttacking = "off";
CSPattack = "off";
}
}
else if(this.Kirby._currentframe < 40 && this.Kirby._currentframe >= 15)
{
this.Kirby.gotoAndPlay("off");
}
else if(this.Kirby._currentframe >= this.Kirby._totalframes)
{
CSPattack = "off";
}
}
else if(Fly == "on")
{
this.gotoAndStop("Fly");
}
else if(Fly == "on2")
{
if(this.Kirby._currentframe < 30)
{
_root.Puhh.gotoAndPlay(1);
_root.Puhh._x = this._x;
_root.Puhh._y = this._y;
_root.Puhh._xscale = this._xscale;
this.Kirby.gotoAndPlay(30);
}
else if(this.Kirby._currentframe >= 35)
{
Fly = "off";
}
}
else if(isAttacking == "on")
{
if(SPattack == "off")
{
this.gotoAndStop("inhale");
}
}
else if(isAttacking == "on2")
{
if(this.Kirby._currentframe < 20)
{
this.Kirby.play();
}
else
{
isAttacking = "off";
}
}
else if(spit == "on")
{
this.gotoAndStop("spit");
if(this.Kirby._currentframe == 1)
{
_root.Starshoot._x = this._x;
_root.Starshoot._y = this._y;
_root.Starshoot._xscale = this._xscale;
_root.Starshoot.gotoAndPlay(1);
}
else if(this.Kirby._currentframe >= 7)
{
spit = "off";
fat = "off";
}
}
else if(ground == "off")
{
if(isjumping == "on")
{
if(Fat == "on")
{
this.gotoAndStop("JumpFat");
}
else
{
this.gotoAndStop("Jump");
if(this.Kirby._currentframe == 1)
{
if(YSpeed < 2)
{
this.Kirby.play();
}
}
}
}
}
else if(Speed == 0)
{
if(Fat == "on")
{
this.gotoAndStop("StandFat");
}
else
{
this.gotoAndStop("Stand");
}
}
else if(Fat == "on")
{
this.gotoAndStop("walkfat");
}
else if(run == "on")
{
this.gotoAndStop("run");
}
else
{
this.gotoAndStop("walk");
}
if(YForm == 100)
{
if(this._yscale < 95)
{
this._yscale += 25;
}
else
{
this._yscale = 100;
}
}
else if(YForm < 100)
{
if(YForm >= this._yscale)
{
YForm = 100;
}
else
{
this._yscale -= 20;
}
}
LastXpos = this._x;
LastYpos = this._y;
if(Die != "on")
{
if(Movwidth - XMSpace < this._x)
{
_root.Level._x -= this._x - (Movwidth - XMSpace);
_root.Starshoot._x -= this._x - (Movwidth - XMSpace);
_root.Puhh._x -= this._x - (Movwidth - XMSpace);
_root.SPAttackStar._x -= this._x - (Movwidth - XMSpace);
this._x = Movwidth - XMSpace;
}
else if(this._x < XMSpace)
{
_root.Level._x -= this._x - XMSpace;
_root.Starshoot._x -= this._x - XMSpace;
_root.Puhh._x -= this._x - XMSpace;
_root.SPAttackStar._x -= this._x - XMSpace;
this._x = XMSpace;
}
if(Ypos == "disabled")
{
if(this._y < 15)
{
this._y = 15;
}
_root.Level._y = 0;
}
else if(Movheight - YMSpaceD < this._y)
{
_root.Level._y -= this._y - (Movheight - YMSpaceD);
_root.Starshoot._y -= this._y - (Movheight - YMSpaceD);
_root.Puhh._y -= this._y - (Movheight - YMSpaceD);
_root.SPAttackStar._y -= this._y - (Movheight - YMSpaceD);
this._y = Movheight - YMSpaceD;
}
else if(this._y < YMSpace)
{
_root.Level._y -= this._y - YMSpace;
_root.Starshoot._y -= this._y - YMSpace;
_root.Puhh._y -= this._y - YMSpace;
_root.SPAttackStar._y -= this._y - YMSpace;
this._y = YMSpace;
}
}
_root.Level.SPAStar.Y -= 0.5;
_root.Level.SPAStar.LY = _root.Level.SPAStar._y;
_root.Level.SPAStar.LX = _root.Level.SPAStar._x;
_root.Level.SPAStar._y -= _root.Level.SPAStar.Y;
_root.Level.SPAStar._x += _root.Level.SPAStar.X / 2;
}